package com.allinone.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import com.allinone.domain.User;
import com.allinone.domain.UserRepository;

@Service
public class UserService {
	@Autowired
	private UserRepository userRepository;

	@Cacheable(value = "listUsers")
	public List<User> listUsers () {
		System.out.println("获取数据123");
		return userRepository.findAll();
	}
	
	
}
